// 导入Vue
import Vue from 'vue'
// 导入i18n国际化语言包
import VueI18n from 'vue-i18n'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
// 导入饿了么UI的语言库
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'

Vue.use(VueI18n)

import en from './en'
import zh from './zh'
import Cookies from 'js-cookie'
const messages = {
    en: {
        workCalender: 'workCalender',
        ...en,
        ...enLocale
    },
    zh: {
        workCalender: '工作日历',
        ...zh,
        ...zhLocale
    }
}
export const i18n = new VueI18n({
    messages,
    // 从本地的localStorage中取出上次登录保存的数据
    locale: Cookies.get('lang') || 'zh'
    // locale: 'en'
})